package com.rj.bd.kj.fdc;

import com.rj.bd.kj.TuoMin;

import java.security.*;

/**
 * @desc 非对称加密的抽象类
 * @author jjr
 */

public abstract class MyAbstractClassFDC implements TuoMin {


    // 实现使用公钥对数据进行加密的方法
    @Override
    public String encrypt(String data) {
        return null;
    }

    public byte[] encrypt(byte[] data) throws InvalidKeyException, SignatureException {
        return null;
    }

    // 实现使用公钥对数据进行加密的方法
    @Override
    public String decrypt(String data) {
        return null;
    }

    @Override
    public String mask(String data) {
        return mask(data);
    }

    @Override
    public KeyPair generateKeyPair(int i, Object o) {
        return generateKeyPair(i, o);
    }





    public abstract KeyPair generateKeyPair(int keySize, String keyFormat) throws Exception;

    public abstract byte[] encrypt(byte[] data, String publicKeyStr, String charset) throws Exception;

    public abstract byte[] decrypt(byte[] encryptedData, String privateKeyStr, String charset) throws Exception;

    public abstract byte[] encrypt(byte[] originalBytes, PublicKey publicKey, String s);

    public abstract byte[] decrypt(byte[] eData, PrivateKey privateKey, String s);
}
